<template>
	<view class="" v-if="list.length>0">
		<pengpai-info v-if="isshow" @change="change()" :top="top" :info="list[index]"></pengpai-info>
	</view>
</template>

<script>
	import PengpaiInfo from '@/components/pengpai/Pengpai-FadeInOut.vue';
	export default{
		name:'PengpaiDom',
		components:{PengpaiInfo},
		props:{
			list:{
				type:Array,
				default:()=>[]
			}
		},
		data(){
			return{
				index:0,
				isshow:true,
				top:205
			}
		},
		mounted() {},
		methods:{
			change(){
				if(this.index==this.list.length-6) this.$emit('changload','load');
				setTimeout(()=>{
					this.isshow=false;
				},1000)
				setTimeout(()=>{
					if(this.index>=this.list.length-1){
						this.index=-1;
					}
					this.index+=1;
					this.isshow=true;
				},2000)
			}
		}
	}
</script>

<style>
</style>
